home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / Grant's CGI Framework 1.0b14 / Documentation / Version History < prev   
Text File  |  1996-04-12  |  19KB  |  199 lines

  1. Grant's CGI Framework
  2.  
  3. Version History
  4.  
  5. Important: When updating your code from a previous version of the framework, you definitly need to make sure that you update your copy of the file "MyConfiguration.h" to include all the new configuration options. If you don't, various bits of code simply won't be compiled/included in your application!
  6. Also make sure you add new files (where appropriate) in the release to your project files! Otherwise you may be missing crucial resources or functions.
  7.  
  8. 1.0 beta 14 - Friday, April 12, 1996
  9.  
  10. IMPORTANT: Many of you are going to wonder what 'p_export' means. I'm using it to export functions using Pascal calling format - only when the framework is being compiled with Pascal support. If you have not turned on Pascal support in "MyConfiguration.h" 'p_export' will be #defined to be nothing - absolutely no effect (as if it didn't exist) - so please just ignore it's presence since it will mean absolutely nothing to the majority of you framework users. (further details on Pascal support are in the version notes below).
  11.  
  12. I've made numerous little fixes throughout the source files, some of which I forgot to document here (but those are insignificant little changes which won't affect the code's compiling).
  13.  
  14. * CGI Utilities
  15.  - Renamed 'CGIDecodeSpecialChars' and 'CGIEncodeSpecialChars' to 'CGIDecodeURLChars' and 'CGIEncodeURLChars'.
  16.  - 'CGIEncodeURLChars' now takes a 'const char *' instead of a 'char *'. A new 'OSErr *' parameter may be NULL if you don't want the err result (from memory allocation). The function has been heavily rewritten to allocate exactly the right amount of space for the new string, instead of growing and shrinking the pointer as it goes along. It also uses pointers instead of offsets. These changes should dramatically improve its performance and stability. (I hope ;-)
  17.  - New function: 'CGICharWillHex' returns true if theChar will be converted to hex when encoding as an URL string. With this, I've changed what qualifies as a non-hex encoding character from just alpha-numeric to include the characters: ?, @, -, ., /, :, ", #, $, &, ', and =. (commas are still hex encoded).
  18.  - Fixed some bad handle locking in 'cgiAEComplete'.
  19.  - Took out the Yield call at the end of 'CGIAESearchDoc'.
  20.  - New function 'CustomCGIPostProcess' in "MyCGIProcess.c". Allows for further processing of a CGI event after the result has been returned to the server.
  21.  - Switched a bunch of the string parameters in the CGI Record structure to use their max values rather than having to allocate string pointers.
  22.  - got rid of the version in the CGI Record structure since it isn't actually a parameter of the CGI event.
  23.  
  24. * Logging
  25. Note that the logging files were just quickly thrown together. A number of additional functions need to be added, as well as cleaning up of the existing functions. Top on this list is producing MacHTTP/WebSTAR style log entries (date, time, etc.).
  26.  - New files "LogUtil.c" & "LogUtil.h"
  27.  - Added needed log file management calls to 'StartupApplication' and 'doIdle' ("EventUtil.c")
  28.  - New configuration option 'kCompileWithDebugLogging'. Will activate a number of calls to 'LogStringDebug' which may be helpful for debugging purposes. This includes listing the parameters received for a CGI event, and the start and finish times for the CGI event (in ticks).
  29.  - New configuration option 'kCompileWithErrorLogging'. When this is on, error messages will be logged (ErrorSystem, ErrorStartup).
  30.  - 'my_assert' now calls 'LogStringDebug' if debug logging is on.
  31.  - The resource TNAM #3002 "Log File Creator" determines the creator type of the log file. If the resource is not present, the creator type will default to 'ttxt' - SimpleText. This resource should eventually be moved to a preferences file (hopefully within the next beta or two).
  32.  
  33. * Files
  34.  - New files "FileUtil.c" & "FileUtil.h"
  35.  - New function 'ResolveAliasFileMountOption' allows the resolving of Finder alias files while preventing the appearance of the 'mount remote volume' interface that can lock up the machine. Use this function instead of the toolbox call 'ResolveAliasFile'.
  36.  
  37. * Process
  38.  - New functions: 'ProcessSleepDefault' and 'ProcessSleepBusy'. Changes the amount of time given to other applications during 'WaitNextEvent' calls and such. These functions change gSleepTicks. You can use these if you want to provide a user preference to change the sleep ticks (such a preference is in the long term plans for the cgi framework preferences interface).
  39.  - New functions: 'ProcessSleepSetDefault' and 'ProcessSleepSetBusy'. Used to set the amount of time allocated when 'ProcessSleepDefault' and 'ProcessSleepBusy' are called. Theses functions do not change gSleepTicks.
  40.  - New local variables 'vSleepTicksDefault' and 'vSleepTicksBusy' (replaces 'gSleepTicksBusy' from "globals.h"). Don't touch these variables - use the 'ProcessSleep...' accessor functions instead.
  41.  - Moved process related code from 'StartupApplication' to new function 'ProcessStartup'.
  42.  - New function 'ProcessGiveTime'. Calling this will give time for other processes (both internal to the app and other applications) to run. If thread manager is available, it will just call ThreadYield, otherwise it will call WNE to give time to other applications. You will generally want to call this instead of ThreadYield.
  43.  - New constant 'ProcessIsBackgroundOnly'. Will tell you whether the application is a background-only application (faceless).
  44.  - Fixed 'ProcessWaitUntilFront' and 'ProcessIsFront' to immediately return false when application is compiled as background only.
  45.  - New functions 'ProcessIsMoreBusy' and 'ProcessIsLessBusy'. These set the 'busy' level of the application, which affects how much time it will try to grab for processing.
  46.  
  47. * Threading
  48.  - Added 'WaitNextEvent' call to 'ThreadFinishAllSubThreads' when giving time for other threads to complete.
  49.  - New function: 'ThreadYield' should be called in place of 'YieldToAnyThread'. Calls to 'YieldToAnyThread' in the framework have been replaced.
  50.  - Moved 'startupThreads' from "Startup.c" to 'ThreadStartup' in "ProcessUtil.c".
  51.  - New global variable 'gThreadQuit' is set true when threads should try to quit.
  52.  
  53. * Deferred Tasks
  54.  - New configuration option 'kCompileWithDeferredTask'. Must be set on if you want to use deferred tasks.
  55.  - New custom function (one you modify) 'CustomDeferredTask' in "MyHandlers.c" (prototype is in "ProcessUtil.h").
  56.  - If you are using Deferred Tasks, 'kStartupThreadsPreallocate' MUST be greater than or equal to one since the deferred task thread uses one preallocated thread. Take this into account when deciding how many threads to preallocate if you preallocate threads for other purposes. Keep in mind that each thread adds about 24k to the application's memory requirements.
  57.  
  58. * Function Name Changes
  59. Most of the 'My...' functions were renamed at the request of users of the framework. If you want to just use the new names, please ensure that you have set 'kCompileWithout_MY_Names' on (1) in "MyConfiguration.h". If you want to continue to use the old names, set 'kCompileWithout_MY_Names' off (0).
  60. This list has the old name followed by the new name.
  61.  - 'MyGotRequiredParams'    'AEFuncGotRequiredParams'
  62.  - 'MyAEIdleFunc'           'AEFuncAEIdleFunc'
  63.  - 'MyOpenDocument'         'CustomOpenDocument'
  64.  - 'MyCGIProcess'           'CustomCGIProcess'
  65.  - 'MyCGIStartup'           'CustomCGIStartup'
  66.  - 'MyCGIQuit'              'CustomCGIQuit'
  67.  - 'MyKeyPress'             'CustomKeyPress'
  68.  - 'MyDoStartDrag'       'CustomDoStartDrag'
  69.  - 'MyListSTARProcess'      'CustomListSTARProcess'
  70.  - 'MyListSTARStartup'      'CustomListSTARStartup'
  71.  - 'MyNewHandle'            'MemoryNewHandle'
  72.  - 'MyNewHandleClear'       'MemoryNewHandleClear'
  73.  - 'MyNewPtr'               'MemoryNewPtr'
  74.  - 'MyNewPtrClear'          'MemoryNewPtrClear'
  75.  - 'MyGrowZone'          'memoryGrowZone' (now a local-only function in "MemoryUtil.c")
  76.  - 'MyNewThreadFromPool'    'ThreadNewThreadFromPool'
  77.  - 'myThreadTermination' 'threadTermination'
  78.  - 'MyQuit'                 'CustomQuit'
  79.  - 'MyStartup'              'CustomStartup'
  80.  - 'MyCloseWindow'          'CustomCloseWindow'
  81.  - 'MyActivateWindow'       'CustomActivateWindow'
  82.  - 'MyUpdateWindow'         'CustomUpdateWindow'
  83.  - 'MyClickInWindow'        'CustomClickInWindow'
  84.  
  85. * Configuration
  86.  - New option 'kCompileWithout_MY_Names'. If you don't want to support the old function names that began with 'My', then turn this option on. The names were changed because people were wanting to keep the 'My' namespace for their custom code.
  87.  
  88. * Symantec Support
  89.  - Defined 'qd' in "globals.h" for Symantec Project Manager PowerPC compiler only since 'qd' is not defined automatically with that compiler.
  90.  
  91. * Codewarrior Support
  92.  - Add "console.stubs.c" to Codewarrior 8 projects.
  93.  - Moved profiler code from "main.c" to "CGI.c"
  94.  
  95. * Memory Handling
  96.  - new constant in "MemoryUtil.h": 'kMemoryHandleLockedFlag' used with HGetState to determine if a Handle is already locked. Does anyone know of an already defined variable in the Universal Headers that means the same thing? I looked in Memory.h, but couldn't find anything like it.
  97.  - Some new assertions in front of calls to HLock (& HLockHi) to ensure the Handle isn't already locked.
  98.  
  99. * About Box (InternetConfig clickable URL)
  100.  - New configuration option 'kCompileWithAboutURL'. When set on, the about box will contain a 'clickable-url' for your cgi home-page (or whatever you set it to be). Use the first string in 'STR#' 3002 "URLs" to set the url to use. This requires InternetConfig 1.1 or later. The 'kCompileWithModelessDialogs' configuration option must be on for this to work.
  101.  - You will probably want to move the "InternetConfig" folder into your Development tools folder (I keep it in my third-party APIs folder). You will then need to set your access paths for your project to include the path to the "InternetConfig" folder.
  102.  
  103. * Pascal Support
  104. The begining of support for customizing the framework using Pascal is now in place. If you want to use Pascal for the custom functions, you will have to create the equivelants of the files: "MyHandlers.c", "MyCGIProcess.c" and "MyListSTARProcess.c" (the last two are only required if you are creating a CGI or ListSTAR event handler). Currently, you have to mix C and Pascal source files in a project.
  105. In order to be able to be able to call C functions from Pascal source, I've defined the 'p_export' keyword (in "compiler_stuff.h") which will cause many of the C functions to use pascal calling conventions. The Pascal interfaces files are not yet ready (but should be by mid to late April). If you are mixing Pascal and C source files, you need to set on the new configuration option: 'kCompileWithPascalSupport'.
  106.  
  107. * Scripting
  108.  - corrected the "cgi test.txt" sample AppleScript file.
  109.  
  110. * Modified Files
  111. AboutBox.c, AEFunc.c, AEFunc.h, AEHandlers.c, AEHandlers.h, CGI.c, CGI.h, cgi test.txt, compiler_stuff.h, constants.h, DebugUtil.c, DebugUtil.h, DialogFunc.c, ErrorInt.c, ErrorUtil.c, ErrorUtil.h, EventUtil.c, EventUtil.h, globals.h, ListSTAR.c, ListSTAR.h, main.c, MemoryUtil.c, MemoryUtil.h, MyCGIProcess.c, MyConfiguration.h, MyCustom.rsrc, MyHandlers.c, MyListSTARProcess.c, ProcessUtil.c, ProcessUtil.h, Quit.c, Quit.h, Startup.c, Startup.h, StringUtil.c, StringUtil.h, WindowInt.c, WindowInt.h
  112.  
  113. * New Files
  114. FileUtil.c, FileUtil.h, LogUtil.c, LogUtil.h, and the InternetConfig support files.
  115.  
  116. * Removed Files
  117. debug.rsrc
  118.  
  119.  
  120. 1.0 beta 13 - Friday, January 26, 1995
  121.  
  122. Important: The CGIRecord (CGIHdl) structure has been changed! The responseData field is no longer a 'char *' (Ptr) - it is now a 'Handle'. You must  'MyCGIProcess'. . This change to the framework can be reverted (to support old code) if you turn the 'kCompileWithCGIResponseDataAsHandle' configuration flag off (in "MyConfiguration.h").
  123.  
  124. * CGI Support
  125.  - Added auto decoding, to the script_name parameter, in 'cgiAESearchDocProcess'.
  126.  - New function 'CGIPathToMacPath'. Converts a '/' delimited path to a ':' delimited one, and makes sure there's at least one ':' at the start if the path includes folders. The path string passed to this function MUST have an extra byte after its terminating null byte.
  127.  - New function 'CGIActionIsCGIorACGI'. Returns true if the action parameter is either CGI or ACGI.
  128.  - Fixed sample html string in the 'MyCGIProcess' function. The closing TITLE element was missing the '/' (</TITLE>). Had to add one to the number of the size of the string used for allocating space for the string (was 141, now is 142). Thanks to Scott Taylor for pointing this out.
  129.  - New field in the CGIRecord (CGIHdl) structure: 'suspended'. It's a Boolean which indicates whether the AppleEvent, that the CGIRecord is being used for, has been suspended.
  130.  - 'CGIAESearchDoc' sets the new 'suspended' field to true if the AESuspendTheCurrentEvent call is successful. It also yields directly to the new thread if the thread is successfully created. (only used if threading)
  131.  - Changed the test in 'cgiAESearchDocProcess' (to determine whether to resume the AppleEvent - almost at the end of the function) for whether the cgi is processing in a sub thread to whether the cgi is processing in a suspended AppleEvent.
  132.  - I commented out the 'thread' field in the CGIRecord structure since it's not currently being used. It may come back again in the future if there is a need for it.
  133.  - Changed CGIrecord (CGIHdl) responseData from 'char *' (Ptr) to 'Handle'. Affected functions: 'cgiAEComplete', 'cgiDisposeHandle' and 'MyCGIProcess'. This can be reverted (to support old code) if you turn the 'kCompileWithCGIResponseDataAsHandle' configuration flag off.
  134.  - Fixed bug in 'CGIFormFieldsFindRecord' where it would crash if (*theCGIHdl)->formFields was nil. Thanks for spotting this bug go to Frank Leahy.
  135.  - Added an optional (long) 'refCon' field to the CGIrecord (CGIHdl). To use it, you must set 'kCompileWithCGIRefCon' on in "MyConfiguration.h". If you want to link your own data into the CGIHdl, use the 'refCon' field to store it (or a reference to it). Currently, I don't touch it, so you're responsible for disposal of any memory you allocate for the 'refCon' field.
  136.  - New function 'CGIFormFieldsFindValue' returns a pointer to the string value of a field. This is basically a wrapper function for 'CGIFormFieldsFindRecord'.
  137.  - Added vNullString initialization to 'InitCGIUtil'.
  138.  
  139. * Menus
  140.  - Moved menu constant declarations into the individual "Menu___.h" files.
  141.  - Updated 'Customizing the Menus' section of the documentation.
  142.  - Added support for the Window_Application window type to the 'adjust___Menu' functions for each menu. This should be improved in a future version to call custom user functions so the default menu files don't have to be modified if you need to do something special with your menus & application windows.
  143.  - Commented out (redundant?) call to 'adjustMenus' in 'mainEventLoop'.
  144.  
  145. * Configuration
  146.  - New additions to "MyConfiguration.h" are now indicated by "•new•" (without the quotes) in the comments above each addition. This should make it easier to update your configuration files.
  147.  - 'kIdleTimeToQuit' specifies the default amount of idle time before the application self quits if 'kCompileWithQuitOnLongIdle' is on.
  148.  - Moved 'kStartupThreadsPreallocate' from "Startup.c" to "MyConfiguration.h".
  149.  - Fixed missing 'kCompileWithThreadedAppleEvents' in CGI AppleEvent handler.
  150.  - Moved 'kSleepTicks' from "constants.h" to "MyConfiguration.h"
  151.  - 'kCompileWithCGIResponseDataAsHandle' is for backward compatibility with old code.
  152.  - 'kCompileWithCGIRefCon' adds the 'refCon' field to CGIRecord (CGIHdl).
  153.  
  154. * Windows
  155.  - Changed the 'dataHdl' member of the 'windowInfo' struct to be a long instead of a Handle. It has also been renamed to 'data', to reflect the change. The reason for this change is because you can store a Handle as a long integer, but you can't store a long as a Handle and I want to be able to do that. Affected functions: WindowNewSetInfo and WindowNewInfoHdl. The new function 'WindowGetData' should be used in place of 'WindowGetDataHdl' (which works the same as before).
  156.  - Changed 'AboutBoxOpen' to use 'WindowNewSetInfo'.
  157.  
  158. * Resources
  159.  - New resource file ":Resources:Menus.rsrc" contains the menu resources that were previously in "essential.rsrc".
  160.  - Moved the Assertion alert resources from the "essential.rsrc" file into the new "debug.rsrc"
  161.  
  162. * Threading
  163.  - New global variables 'gThreadSleeper' and 'gThreadSleeperIndex' (initialized in 'startupThreads')
  164.  - Changed 'MyNewThreadFromPool' and 'myThreadTermination' to put the current thread to sleep (instead of doing a while loop using YieldToAnyThread) if there aren't enough sub-threads to allocate.
  165.  - New function 'EventSpawnAEDispatcherThread' called by 'startupAE'.
  166.  
  167. * Symantec Project Manager
  168.  - Added "ThreadsLib.xcoff" file for PPC compiling. Still getting a link error on the 'qd' global - but I've sent a message to Symatec Tech Support to find out how to fix that. We're almost there!
  169.  - Make sure you're using Universal Headers 2.0.1 or later!
  170.  
  171. * Startup - Fixed a bug in 'startupTrapAvailable'. Identified by Scott Taylor.
  172.  - Added some additional error checking to 'StartupApplication'.
  173.  - Added some new error strings to 'STR#' 301 'Startup Error Strings' in "essential.rsrc"
  174.  
  175. * Miscellaneous
  176.  - New function 'StringConvertCharToChar'
  177.  - New function 'ProcessWaitUntilFront'
  178.  - New constant 'kSleepTicksWhenBusy' in "MyConfiguration.h". Used for reducing sleep time when multiple threads are processing. Modified functions 'MyNewThreadFromPool' and 'myThreadTermination' in "ProcessUtil.c".
  179.  - Removed unused local variable 'theThread' from 'doHighLevelEvent' in "EventUtil.c"
  180.  - 'doMenu' and a few of the functions in "EventUtil.c" now use 'ResetQuitIdleTimer'
  181.  - New mailing list: grantcgi-announce@arpp1.carleton.ca
  182.  
  183. * Modified Files
  184. AboutBox.c, CGI.c, CGI.h, constants.h, Documentation, essential.rsrc, EventUtil.c, globals.h, MenuApple.h, MenuEdit.c, MenuEdit.h, MenuFile.c, MenuFile.h, MenuFunc.c, MenuFunc.h, MyCGIProcess.c, MyConfiguration.h, ProcessUtil.c, ProcessUtil.h, Read Me, Startup.c, StringUtil.c, StringUtil.h, WindowInt.c, WindowInt.h. And all the project files.
  185.  
  186. * New Files
  187. debug.rsrc, Menus.rsrc
  188.  
  189.  
  190. ____________________
  191. StarNine, ListSTAR, and WebSTAR are trademarks of StarNine Technologies, Inc.
  192. AppleScript, Macintosh, Mac, and MacTCP are trademarks or registered trademarks of Apple Computer, Inc.
  193. UNIX is a registered trademark of Novell, Inc.
  194. CodeWarrior is a trademark of Metrowerks Inc.
  195. Symantec is a trademark of Symantec Corporation.
  196. WorkSMART is a trademark of InfoDesign Corporation.
  197. Grant's CGI Framework is, for those who even bother to read the small print, a GrantMark and a TradeMark of Grant Neufeld.
  198. Copyright ©1995,1996 by Grant Neufeld
  199.